#ifndef _ILOGDATABASE_H_
#define _ILOGDATABASE_H_


#pragma pack(1) 

#define FIELD_NAME_LEN	80
#define FIELD_TYPE_LEN	40	

typedef struct TagFieldSturct {

	char name[FIELD_NAME_LEN + 1];
	char type[FIELD_TYPE_LEN + 1];
	UINT size;
	UINT index;

}FieldSturct;

#pragma pack()

interface ITableStruct : public IBase
{
	std_method(SetRecord)(const FieldSturct& field) PURE;
	std_method(GetRecord)(UINT loop, FieldSturct* field) PURE;
	std_method(GetAllRecord)(FieldSturct fields[], UINT Count) PURE;
	std_method(GetFieldsCount)(UINT &count) PURE;
	std_method(GetTableName)(LPSTR name) PURE;
	std_method(SetTableName)(LPCSTR name) PURE;
	std_method(SetKeyValue)(LPCSTR name, UINT op) PURE;
	std_method_(UINT, IsExist)() PURE;
	std_method_(UINT, GetOp)() PURE;
};

// {2B0185A7-9E1E-4148-9FDB-0C2650818B41}
_DEFINE_IID(IID_ITableStruct,
	0x2b0185a7, 0x9e1e, 0x4148, 0x9f, 0xdb, 0xc, 0x26, 0x50, 0x81, 0x8b, 0x41);

interface ILogDataBase : public IBase
{
	std_method(IsTableExist)(LPCSTR name, IBase **pTable) PURE;
	std_method(SyncTable)(LPCSTR name, IBase *pBase) PURE;
	std_method(InsertTable)(UCHAR* pBuf, ULONG uSize) PURE;
};

// {013223D9-5776-49BF-B0E9-BD70960E0B4C}
_DEFINE_IID(IID_ILogDataBase,
	0x13223d9, 0x5776, 0x49bf, 0xb0, 0xe9, 0xbd, 0x70, 0x96, 0xe, 0xb, 0x4c);

// {34F9B3BF-6F56-4058-9DCD-04D9A5F0174B}
_DEFINE_GUID(CLSID_ILogDataBase,
	0x34f9b3bf, 0x6f56, 0x4058, 0x9d, 0xcd, 0x4, 0xd9, 0xa5, 0xf0, 0x17, 0x4b);


#endif



